package com.achieve.mqtt.gateway;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;

//网关接口发送消息（用于发送消息到出站通道）
@MessagingGateway(defaultRequestChannel = "messageOutboundChannel")
public interface MqttGateway {
    void sendMsgToMqtt(@Header(value = MqttHeaders.TOPIC) String topic, String payload);

    void sendMsgToMqtt(@Header(value = MqttHeaders.TOPIC) String topic, @Header(value = MqttHeaders.QOS) int qos, String payload);
}
